package hungry;

/**
 * 饿汉模式单例
 * @author gaopeng
 * @date 2019/12/7 3:19 下午
 */
public class Emperor {

    private Emperor(){}

    private static Emperor emperor = new Emperor();

    public static Emperor getInstance(){
        return emperor;
    }

    public void say(){
        System.out.println("我是皇帝某某某。");
    }
}
